import BaseComponent from "../components/BaseComponent";
import PanelManager from "../Managers/PanelManager";
import TishiPanel from "../panel/TishiPanel";
import CannonLayer from "../components/CannonLayer"
import BulletController from "../components/BulletController";
// import PanelManager from "../Managers/PanelManager";

const {ccclass, property} = cc._decorator;

export default class GameScene extends BaseComponent {

    onLoad () 
    {
        


        super.onLoad();

        
        cc.director.getCollisionManager().enabled = true;
        cc.director.getCollisionManager().enabledDebugDraw = true;
        cc.director.getCollisionManager().enabledDrawBoundingBox = true;

        this.add_button_listen("testBtn", this, this.onGameStartClick);
        
        
        this.addComponent(CannonLayer);
        this.addComponent(BulletController);
        

    }



    start ()
    {
    }

    onGameStartClick()
    {
        
        var panel:cc.Node = PanelManager.getInstace().showPanel("TishiPanel");
        panel.addComponent("TishiPanel");

    }

    // update (dt) {}
}
